Search and Download - Upload Key API
Objective
The Search and Download - Upload Key API is used to share the private key and the financial institution code with HyperVerge that is further used to link them to the credentials created for you by HyperVerge.
This API call is a prerequisite step for the Search and Download API.
It should be called only once to allow HyperVerge's access to CERSAI.
| Input | Output |
|---|---|
| The private key and the financial institution code. | The success or failure status of the upload. |
API URL
https://ind-ckyc.hyperverge.co/api/v1/key
Overview
The API is RESTful and uses standard HTTP verbs and status codes. The responses are in JSON format and you should upload all images and files as form-data through a POST request.
Authentication
You need a unique pair of application ID ( appId ) and application key (appKey) from HyperVerge to verify your identity for accessing the API.
API Request Details
Method - POST
Headers
| Parameter | Mandatory or Optional | Type | Description | Valid Values |
|---|---|---|---|---|
content-type | Mandatory | string | This parameter defines the media type for the request payload. | application/json |
appId | Mandatory | string | The application ID shared by HyperVerge | Not Applicable - this is a unique value. |
appKey | Mandatory | string | The application key shared by HyperVerge | Not Applicable - this is a unique value. |
transactionId | Mandatory | string | The unique ID for the customer journey. | Not Applicable - this is a unique value related to a transaction in your application. |
Input
The following table provides the complete information on the parameters used in the request body for the API call.
| Field | Description |
|---|---|
privateKey | The private key for the process. |
fiCode | The financial institution code assigned by CKYC upon registration. |
The FI code is different for the live and the test(or the testbed) environment. You should only share the Live Fi Code with HyperVerge.
Request
The following code shows a standard curl request for the API.
curl --location --request POST 'https://ind-ckyc.hyperverge.co/api/v1/key' \
--header 'appID: <Enter_the_HyperVerge_appId>'\
--header 'appKey: <Enter_the_HyperVerge_appKey>'\
--header 'transactionID: <Enter_the_HyperVerge_transactionID>' \
--data-raw '{
"privateKey": "privateKey shared with CERSAI",
"fiCode" : "fiCode"
}'
Success Response
The following is a sample response for a successful upload.
{
"status": "success",
"statusCode": "200",
"result": {
"status": true
}
}
Success Response Details
The status in the response is "true" when the API has successfully mapped the FI code and the private key to your HyperVerge credentials.
Error Responses
The following are the sample error responses for the API.
- Missing FI Code
- Missing privateKey
- Server Error
{
"status": "failure",
"statusCode": "400",
"error": {
"code": "ER_REQ_VALIDATE",
"message": "fiCode should not be null or undefined"
}
}
{
"status": "failure",
"statusCode": "400",
"error": {
"code": "ER_REQ_VALIDATE",
"message": "privateKey should not be null or undefined"
}
}
{
"status": "failure",
"statusCode": "500",
"error": {
"code": "ER_SERVER",
"message": "Internal server error"
}
}
Error Response Details
failure status with a relavant status code and error message.
The following table lists all error responses. | Status Code | Error Message | Error Description |
|---|---|---|
| 400 | fiCode should not be null or undefined | The request is missing the mandatory fiCode input. |
| 400 | privateKey should not be null or undefined | The request is missing the mandatory privateKey input. |
| 500 | Internal Server Error | There was an error either with the request or with HyperVerge's server. Kindly check the API request's headers or contact the HyperVerge team for resolution. |